<template>
  <div class="slide-box">
    <swiper class="swiper-wrapper" :options="swiperOption">
      <swiper-slide class="swiper-slide" v-for="(item, index) in carouselArr" :key="index">
        <img :src="item.picurl" style="width:1200px;height:484px" />
      </swiper-slide>
    </swiper>
  </div>
</template>

<script>
import { swiper, swiperSlide } from "vue-awesome-swiper";
export default {
  name: "swiperPage",
  components: {
    swiper,
    swiperSlide,
  },
  data() {
    return {
      currentPage: "1",
      pageSize: "10",
      state: "1",
      carouselArr: [],
      swiperOption: {
        autoplay: 3000,
        autoplayDisableOnInteraction: false,
        loop: true,
      },
    };
  },
  mounted() {
    this.getlbt();
  },
  methods: {
    getlbt() {
      this.$api
        .getljlbt({
            currentPage: this.currentPage,
            pageSize: this.pageSize,
            state: this.state,
          }
        )
        .then((res) => {
          this.carouselArr = res.data.data.list
        })
        .catch(() => {});
    },
  },
};
</script>

<style lang="stylus" scoped>
.slide-box {
  // margin-top -16px
  height: 430px;
}

>>>.swiper-wrapper {
  height: 484px;
  width: 1200px;
}

>>>.swiper-slide {
  height: 484px;
  background-repeat: no-repeat;
}
</style>
